if not SYSPATH then return end
	-----------------------------------------
	--解散界面
	-----------------------------------------
	local M  			= class("dismiss",PanelInner)
	local model         = app.gamesUse("model")
	local hall_model    = app.model("hall")
	local request 		= app.gamesUse("request")
	local scheduler 	= require("framework.scheduler")
	
	M.dismissLayer = nil
	M.no = nil
	M.yes = nil
	M.queding = nil
	M.desc = nil
	M.img = nil
	M.time = 300
	M.diMisScheduler = nil
	M.data = nil
	M.mySeatId = 0
	M.selfId = 0
	M.times = nil
	
	function M:ctor()
		self.class.super.ctor(self)
		self:init()
	end
	
	function M:onEnter()
		self.class.super.onEnter(self)
		
	end
	
	function M:onExit()
		if self.diMisScheduler then
			scheduler.unscheduleGlobal(self.diMisScheduler)
			self.diMisScheduler = nil
		end
	end
	
	function M:getSeatidByUid( id )
		local PlayerArray = model.roomData._list
		for k,v in pairs(PlayerArray) do
			if v.Uid == id then
				return k
			end
		end
	end
	
	function M:init()
		self.selfId = app.model("hall").Uid.get()
		self.mySeatId = self:getSeatidByUid(self.selfId)
		self.dismissLayer = cc.CSLoader:createNode("zjh/res/ShenqingLayer.csb")
		self:addChild(self.dismissLayer,999)
		Adaptive(self.dismissLayer).h()
		self.no = cc.uiloader:seekNodeByName(self.dismissLayer, "Button_no"):setVisible(false)
		self.yes = cc.uiloader:seekNodeByName(self.dismissLayer, "Button_yes"):setVisible(false)
		self.queding = cc.uiloader:seekNodeByName(self.dismissLayer, "Button_queding"):setVisible(false)
		self.desc = cc.uiloader:seekNodeByName(self.dismissLayer, "txt_desc")
		self.slide_bar = cc.uiloader:seekNodeByName(self.dismissLayer, "slide_bar")
		local function callBack(obj,e)
			if e == ccui.TouchEventType.ended then
				if obj:getName() == "Button_no" then
					request:choiceDismiss(false)
					self.no:setVisible(false)
					self.yes:setVisible(false)
				elseif obj:getName() == "Button_yes" then
					request:choiceDismiss(true)
					self.no:setVisible(false)
					self.yes:setVisible(false)
				elseif obj:getName() == "Button_queding" then
					model.dismissData = {}
					model.disMaster = 0
					game.view.back("common.dismiss","zjh")
				end
			end
		end
		self.yes:addTouchEventListener(callBack)
		self.no:addTouchEventListener(callBack)
		self.queding:addTouchEventListener(callBack)
		self:createPlayers()
		self:showClock()
	end
	
	function M:createPlayers()

		print("》》》》》model.disMaster",model.disMaster)
		
		print("VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",model.disMaster)
		local master = model.roomData._list[model.disMaster].name
		local str = "玩家【"..master .."】" .. "申请解散房间,请等待其他玩家选择(超过100s未做选择,则默认同意)"
		self.desc:setString(str)
		local list = model.roomData._list
		local bg = cc.uiloader:seekNodeByName(self.dismissLayer, "Sprite_1")
		local leng = #list - 1
		local posx = bg:getContentSize().width/2 -  (leng%2 ~= 0 and leng/2 * 199.7 + 199.7/2 or leng/2 * 199.7 + 199.7/2 )
		local idx = 1
		for key ,var in pairs(list) do
			if key ~= model.disMaster then
				local cel = cc.uiloader:seekNodeByName(self.dismissLayer, "cell"):clone()
				cel:setPosition(cc.p(posx + idx * 99.7,195))
				idx = idx + 1
				cel:setVisible(true)
				cel:setName("player" .. var.Uid)
				cel:setTag(var.Uid)
				local zhezhao = cc.uiloader:seekNodeByName(cel, "img_zhezhao")
				zhezhao:setLocalZOrder(4)
				local name = cc.uiloader:seekNodeByName(cel, "txt_name")
				name:setString(var.Uid)
				name:setVisible(true)
	
				local sp = cc.Sprite:create()
				sp:setPosition(cc.p(94/2,93/2))
				cel:addChild(sp)
				HttpRequest.image(var.FaceUrl,sp,93,function(code)  end)
	
				bg:addChild(cel)
			end
		end
	end
	
	function M:createDisMiss(data)
		if model.disMaster > 0  and model.disMaster ~= self.mySeatId then
			self:createPlayers()
		end
		print("2222222222222222222222222222222222222222222222222222222222222",model.disMaster)
		self:setShowBtn()
	end
	
	function M:disMissUpdate()
		if model.disMaster ~= 0 then
			for key, var in pairs(model.roomData._list) do
				if key ~= model.disMaster then
					local v = model.dismissData[key]
					dump(model.dismissData)
					if v and v ~= 0 then
						local cel = cc.uiloader:seekNodeByName(self.dismissLayer, "player" .. var.Uid)
						local zhezhao = cc.uiloader:seekNodeByName(cel, "img_zhezhao")
						local img_tag = cc.uiloader:seekNodeByName(cel, "img_tag")
						if v > 0 then
							img_tag:loadTexture("zjh/res/jiiesanroom/tongyi_2x1.png")
						else
							img_tag:loadTexture("zjh/res/jiiesanroom/jujue_2x.png")
						end
						zhezhao:setVisible(true)
					end
				end
			end
		end
		self:setShowBtn()
	end
	
	function M:setShowBtn()
		local v = model.dismissData[self.mySeatId]
		if model.disMaster ~= self.mySeatId then
			local bol = false
			if not v then
				bol = true
			end
			self.no:setVisible(bol)
			self.yes:setVisible(bol)
		end
	end
	
	--解散
	function M:dismissResult(data)
		self:disMissUpdate()
		if self.diMisScheduler then
			scheduler.unscheduleGlobal(self.diMisScheduler)
			self.diMisScheduler = nil
			self.slide_bar:setPercent(100)
		end
		if data[1] == false then
			self.desc:setString("由于玩家大部分玩家选择拒绝,房间解散失败。")
			self.queding:setVisible(true)
		else
			runDelayAction(self.dismissLayer,0,function ()     -- 10 秒没响应关掉
				model.dismissData = {}
				model.disMaster = 0
				game.view.back("common.dismiss","zjh")
			end)
		end
	end
	
	-- function M:disMissDesc()
	--     local str = ""
	--     for key, var in pairs(model.roomData._list) do
	--         if key ~= model.disMaster then
	--             local v = model.dismissData[key]
	--             local name = var.Uid
	--             if v ~= 0 then
	--                 if v > 0 then
	--                     chr = "选择同意"
	--                 else
	--                     chr = "选择拒绝"
	--                 end
	--             else
	--                 chr = "等待选择"
	--             end
	--             str = str .. name .. chr .. "\n"
	--         end
	--     end
	--     return str
	-- end
	
	function M:showClock()
		local sTime = 0
		local function callback()
			sTime = sTime - 1
			if sTime < 0 then
				scheduler.unscheduleGlobal(self.diMisScheduler)
			else
				self.slide_bar:setPercent(100 - sTime)
			end
		end
		
		if not self.diMisScheduler then
			sTime = 100
			self.diMisScheduler = scheduler.scheduleGlobal(callback ,1)
		end
	end
	
	return M